Network device having reduced latency

ABSTRACT

A network device includes a transmit buffer from which data is transmitted to a network, and a packet buffer from which data chunks are transmitted to the transmit buffer in response to read requests. The packet buffer has a maximum read latency from receipt of a read request to transmission of a responsive data chunk, and receives read requests including a read request for a first data chunk of a network packet and a plurality of additional read requests for additional data chunks of the network packet. A latency timer monitors elapsed time from receipt of the first read request, and outputs a latency signal when the elapsed time reaches the first maximum read latency. Transmission logic waits until the elapsed time equals the first maximum read latency, and then transmits the first data chunk from the transmit buffer, without regard to a fill level of the transmit buffer.

CROSS REFERENCE TO RELATED APPLICATION

This claims the benefit of commonly-assigned U.S. Provisional PatentApplication No. 62/595,446, filed Dec. 6, 2017, which is herebyincorporated by reference herein in its entirety.

FIELD OF USE

This disclosure relates to a data switching device for use in a network.More particularly, this disclosure relates to a network data switchingdevice having a write buffer/transmit FIFO which operates with reducedlatency while avoiding underrun.

BACKGROUND

The background description provided herein is for the purpose ofgenerally presenting the context of the disclosure. Work of theinventors hereof, to the extent the work is described in this backgroundsection, as well as aspects of the description that may not otherwisequalify as prior art at the time of filing, are neither expressly norimpliedly admitted to be prior art against the present disclosure.

Network switching devices operate at high data rates and highbandwidths. In order to maintain communications between devices, it isimportant to avoid an “underrun” condition—i.e., a situation thattypically occurs after transmission has started, where a transmitter(for, example, a port) has insufficient data for transmission—because anunderrun condition may cause a remote device to assume erroneously thata session transmission is complete or that a connection has been broken,which could lead to the remote device erroneously terminating thesession at its end. At the same time, it is desirable to utilize thecapacity of the connection to the maximum extent possible—i.e., it isdesirable to attempt to achieve “full wire speed.”

SUMMARY

A network device, in accordance with implementations of the subjectmatter of the present disclosure, for connection to a communicationsnetwork, includes a transmit buffer from which data is transmitted fromthe network device to the communications network, and a packet bufferfrom which chunks of data are transmitted to the transmit buffer inresponse to read requests. The packet buffer has a first maximum readlatency from receipt of a respective read request to transmission of arespective data chunk responsive to the respective read request, andreceives a first stream of read requests including a first read requestfor a first data chunk of a first network packet and a plurality ofadditional read requests for additional data chunks of the first networkpacket. The network device further includes a latency timer thatmonitors an amount of time that has elapsed from receipt of the firstread request for a first data chunk of the first network packet, andoutputs a latency signal when the amount of time that has elapsedreaches the first maximum read latency, and transmission logicconfigured to wait until the amount of time that has elapsed fromreceipt of the first read request for a first data chunk of the firstnetwork packet equals the first maximum read latency, and when theamount of time that has elapsed from receipt of the first read requestfor a first data chunk of the first network packet, transmit the firstdata chunk of the first network packet from the transmit buffer, withoutregard to a fill level of the transmit buffer.

A first implementation of such a network device further includes alatency counter that is incremented by the latency signal output by thelatency timer. The transmission logic is configured to check the latencycounter following the first request for the first data chunk of thefirst network packet, until a non-zero value is detected, signifyingthat the amount of time that has elapsed from receipt of the first readrequest for the first data chunk of the first network packet at leastequals the first maximum read latency.

In a second implementation of such a network device, the first stream ofread requests is received in a read order, and the network devicefurther includes a transmission timer configured to measure a period oftime that has elapsed from the transmitting of the first data chunk ofthe first network packet from the transmit buffer. The transmissionlogic is configured to, when the period of time that has elapsed fromthe transmitting of the first data chunk of the first network packetfrom the transmit buffer reaches any integer multiple of a predeterminedinterval that defines a desired data rate, transmit a next data chunk ofthe first network packet, according to the read order, without regard tothe fill level of the transmit buffer.

In that second implementation, the data chunks of the first networkpacket arrive at the transmit buffer out of the read order, the datachunks of the first network packet are tagged with indications ofordinal position in the first network packet, and the transmit bufferincludes a set of ordered locations for storing the data chunks of thefirst network packet according to the indications of ordinal position,prior to transmission from the transmit buffer.

In a third implementation of such a network device, the first maximumread latency is defined by a number of clock cycles between receipt of arespective read request to transmission of a respective data chunkresponsive to the respective read request, and the latency timerincludes a delay line having a number of sampling elements equal to thenumber of clock cycles defining the first maximum read latency.

In a first variant of that third implementation, the delay line includesa shift register.

A second variant of that third implementation further includes a latencycounter coupled to a first output tap of the delay line. Thetransmission logic is configured to check the latency counter for anon-zero value to determine when the amount of time that has elapsedfrom receipt of the first read request for a first data chunk of thefirst network packet reaches the first maximum read latency.

In a fourth implementation of such a network device, the packet bufferreceives at least one additional stream of read requests including afirst read request for a first data chunk of an additional networkpacket and a plurality of additional read requests for additional datachunks of the additional network packet, the packet buffer has arespective additional maximum read latency for each respectiveadditional stream of read requests; the latency timer further measures arespective additional amount of time that has elapsed time from eachfirst read request for each first data chunk of each respectiveadditional network packet, and the transmission logic is furtherconfigured to wait until the respective additional amount of time thathas elapsed from the first read request for a first data chunk of eachrespective additional network packet equals the respective additionalmaximum read latency, and when the respective additional amount of timethat has elapsed from the first read request for a first data chunk of arespective additional network packet equals the respective additionalmaximum read latency, transmit the first data chunk of the respectiveadditional network packet from the transmit buffer, without regard tothe fill level of the transmit buffer.

In a variant of that fourth implementation, each of the first maximumread latency and each respective additional maximum read latency ismeasured as a respective number of clock cycles, and the latency timerincludes a delay line having a number of samples equal to a number ofclock cycles in a longest one of the first maximum read latency and eachrespective additional maximum read latency, each respective one of thefirst maximum read latency and each respective additional maximum readlatency corresponding to a respective tap of the delay line.

That variant further includes a respective latency counter coupled toeach respective output tap of the delay line. The transmission logic isconfigured to check each respective latency counter for a non-zero valueto determine that the respective additional amount of time that haselapsed from the first read request for a first data chunk of arespective network packet equals the respective maximum read latency.

A method of operating a network device coupled to a communicationsnetwork, in accordance with implementations of the subject matter of thepresent disclosure, includes receiving at a packet buffer of the networkdevice a stream of read requests to read data of network packets fromthe packet buffer of the network device. The read requests include afirst read request to read a first data chunk of a first network packetand a plurality of subsequent read requests to read subsequent datachunks of the first network packet, each of the first request and theplurality of subsequent read requests causing a respective data chunk tobe communicated from the packet buffer to a transmit buffer. The packetbuffer has a maximum read latency indicative of an amount of timerequired, following one of the first read request or any one of thesubsequent read requests, to return a data chunk from the packet buffer.The method further includes monitoring an amount of time that haselapsed from receipt of the first read request for a first data chunk ofthe first network packet, and when the amount of time that has elapsedfrom receipt of the first read request for a first data chunk of a firstnetwork packet equals the maximum read latency, transmitting the firstdata chunk of the first network packet from the transmit buffer, withoutregard to a fill level of the transmit buffer.

In a first implementation of such a method, the measuring the amount oftime that has elapsed, from receipt of the first read request for afirst data chunk of the first network packet includes providing a delayline having a delay equal to the maximum read latency, injecting asignal into the delay line upon the receipt of the first read requestfor a first data chunk of the first network packet, monitoring an outputof the delay line for the signal, incrementing a counter from ‘0’ to anon-zero value upon detection of the signal at the output of the delayline, and checking whether the counter contains a non-zero value.

In a second implementation of such a method, the stream of read requestsis received in a read order, and the method further includes monitoringa period of time that has elapsed from commencement of transmission ofthe first data chunk of the first network packet from the transmitbuffer, and when the period of time that has elapsed from commencementof transmission of the first data chunk of the first network packet fromthe transmit buffer reaches any integer multiple of a predetermined timeinterval, defining a desired data rate, following the commencement oftransmission of the first data chunk of the first network packet fromthe transmit buffer, transmitting one of the subsequent data chunks ofthe first network packet according to the read order, without regard tothe fill level of the transmit buffer.

A variant of that implementation further includes, for data chunks thatarrive at the transmit buffer out of the read order, reordering the datachunks prior to transmission from the transmit buffer, and transmittingthe reordered data chunks from the transmit buffer in the read order. Inthat variant, the data chunks may be tagged with indications of ordinalposition within the network packet, and the reordering may includestoring the tagged data chunks, according to the indications of ordinalposition within the network packet, in ordered locations in the transmitbuffer.

In a third implementation of such a method, where there are a pluralityof respective additional streams of respective additional read requestscorresponding to a plurality of respective network packets, eachrespective additional stream of read requests including a respectiveadditional first request for a respective additional first data chunk ofeach respective additional network packet and respective additionalsubsequent requests for respective additional subsequent data chunks ofeach respective additional network packet from the packet buffer, eachrespective additional stream of respective additional read requestsbeing received in a respective read order for its respective additionalnetwork packet, the packet buffer having a respective maximum readlatency for each respective additional stream of respective additionalread requests, the method further includes monitoring a respectiveadditional amount of time that has elapsed from receipt of eachrespective additional read request, in a respective additional stream ofrespective additional read requests, for a respective additional firstdata chunk of each respective additional network packet other than thefirst network, and when the respective additional amount of time thathas elapsed from receipt of the respective additional first read requestfor a respective additional first data chunk of a respective additionalnetwork packet other than the first network packet equals the respectiveadditional maximum read latency for the respective additional stream ofrespective additional read requests, transmitting the respectiveadditional first data chunk of the respective additional network packetfrom the transmit buffer.

In a first variant of the third implementation, the monitoring theamount of time that has elapsed from receipt of the first read requestfor a first data chunk of the first network packet, and the monitoringthe respective additional amount of time that has elapsed from receiptof each respective additional read request, in a respective additionalstream of respective additional read requests, for a respectiveadditional first data chunk of each respective additional network packetother than the first network packet, include providing a delay linehaving respective delays equal to each respective maximum read latency,injecting a respective signal into the delay line upon the receipt of arespective first read request for a respective first data chunk of arespective first network packet, monitoring a respective output of thedelay line for the respective signal, incrementing a respective counterfrom ‘0’ to a non-zero value upon detection of the respective signal atthe respective output of the delay line, and checking whether arespective counter contains a non-zero value.

A second variant of the third implementation further includes monitoringa respective period of time that has elapsed from respectivecommencement of transmission of the first data chunk of each respectivenetwork packet from the transmit buffer, and upon elapsing of eachinteger multiple of a respective predetermined time interval, defining adesired data rate, following the respective commencement of thetransmission of the first data chunk of each respective network packetfrom the transmit buffer, transmitting a respective subsequent datachunk of the respective network packet, without regard to the fill levelof the transmit buffer.

The second variant of the third implementation may further include, fordata chunks of a respective network packet having a read order, thatarrive at the transmit buffer out of the read order, reordering the datachunks of the respective network packet prior to transmission from thetransmit buffer, and transmitting the reordered data chunks of therespective network packet from the transmit buffer in the read order.

In the second variant of the third implementation the data chunks of therespective network packet may be tagged with respective indications ofordinal position within the respective network packet, and thereordering may include storing the tagged data chunks of the respectivenetwork packet, according to the respective indications of ordinalposition within the respective network packet, in a respective set ofordered locations in the transmit buffer.

Another method of operating a network device coupled to a communicationsnetwork, in accordance with implementations of the subject matter of thepresent disclosure, includes receiving at a packet buffer of the networkdevice a stream of read requests to read data of a network packet fromthe packet buffer of the network device, the read requests including afirst read request to read a first data chunk of the network packet anda plurality of subsequent read requests to read additional data chunksof the network packet, each of the first request and the plurality ofsubsequent read requests causing a respective data chunk to becommunicated from the packet buffer to a transmit buffer. The methodalso includes transmitting the first data chunk of the network packetfrom the transmit buffer without regard to a fill level of the transmitbuffer, and transmitting subsequent data chunks of the network packet atmultiples of a predetermined time interval, defining a desired datarate, following commencement of the transmitting of the first data chunkof the network packet.

In a first implementation of such a method, the packet buffer has amaximum read latency indicative of an amount of time required, followingone of the first read request or any one of the additional readrequests, to return a data chunk from the packet buffer, and thetransmitting the first data chunk of the network packet from thetransmit buffer without regard to the fill level of the transmit bufferincludes monitoring an amount of time that has elapsed from receipt ofthe first read request for the first data chunk of the network packet,and when the amount of time that has elapsed from receipt of the firstread request for the first data chunk of the network packet equals themaximum read latency, transmitting the first data chunk of the networkpacket from the transmit buffer.

In that first implementation, the monitoring the amount of time that haselapsed from receipt of the first read request for a first data chunk ofthe network packet includes providing a delay line having a delay equalto the maximum read latency, injecting a signal into the delay line uponthe receipt of the first read request for a first data chunk of thenetwork packet, monitoring an output of the delay line for the signal,incrementing a counter from ‘0’ to a non-zero value upon detection ofthe signal at the output of the delay line, and checking whether thecounter contains a non-zero value.

A second implementation of such a method further includes, for datachunks of the network packet having a read order, that arrive at thetransmit buffer out of the read order, reordering the data chunks of thenetwork packet prior to transmission from the transmit buffer, andtransmitting the reordered data chunks of the network packet from thetransmit buffer in the read order.

BRIEF DESCRIPTION OF THE DRAWINGS

Further features of the disclosure, its nature and various advantages,will be apparent upon consideration of the following detaileddescription, taken in conjunction with the accompanying drawings, inwhich like reference characters refer to like parts throughout, and inwhich:

FIG. 1 is a representation of a portion of a network switching device inaccordance with implementations of the subject matter of thisdisclosure;

FIG. 2 is a representation of an implementation of a transmit buffer inthe network switching device of FIG. 1; and

FIG. 3 is a flow diagram of a method of operating a network switchingdevice in accordance with implementations of the subject matter of thisdisclosure.

DETAILED DESCRIPTION

In order to ensure, probabilistically, that underrun can be avoidedwhile approaching full wire speed, implementations of the subject matterof this disclosure provide a network switching device that reduceslatency by determining when to begin a transmission based on the amountof time that has elapsed time following the request that leads to thetransmission, rather than determining when to begin based on the amountof data accumulated in a transmit buffer following the request thattriggers the transmission.

A transmit buffer receives data, from a packet buffer, typically inresponse to read requests, for transmission out of the switching devicethrough a corresponding port. In implementations of the subject matterof the present disclosure, the packet buffer is a “probabilistic”memory—meaning that the read response latency of the packet buffer isnot constant, but the packet buffer is designed to guarantee a responsewithin a maximum latency interval, whose probability of being exceededis below a predetermined value (e.g., once every 10 years). The maximumlatency interval of the packet memory may also depend on specificcharacteristics of the packets—e.g., packet size, type of packet, etc.

Ports of the switching device operate at a certain data rate, meaningthat once a flow of data to a port has been initiated, the port expectsto receive data at that rate, and if the port does not receive data atthat rate, underrun may occur. For example, the port may expect toreceive a portion of data at a predetermined interval. For this purpose,the portion can be a “cell” of a defined size (e.g., determined by buswidth) or a more generic “chunk” of data. In one example, if the datarate of the port is such that the port expects a chunk or cell of dataevery five clock cycles, then once data begins to flow toward the port,the second chunk or cell must arrive within five clock cycles of thearrival of the first chunk or cell, the third chunk or cell must arrivewithin ten clock cycles of the arrival of the first chunk or cell, etc.Whenever this requirement is violated, underrun may occur, possiblyresulting in a fatal packet error.

In an extreme example, during completely “normal” operation, a firstdata chunk or cell may arrive with no or minimal latency, while a seconddata chunk or cell may arrive with the maximum latency, with the resultthat the two data chunks or cells are separated by nearly twice themaximum latency. Even at lesser extremes of normal operation, two chunksor cells of a network packet can be separated by more than the maximumlatency. To prevent underrun, the transmit buffer buffers some number ofchunks or cells of a network packet before beginning transmission of anychunks of the network packet, so that it can release chunks or cells fortransmission at predetermined intervals based on the desired data rate.

In previously-known implementations, a transmit buffer would accumulatea certain number of chunks or cells of a network packet, andtransmission of chunks or cells of the network packet would onlycommence once a minimal fill level threshold of the buffer was met. Afill level threshold, N, of chunks or cells depended on the maximumlatency interval of the packet buffer, the width of the interface, theclock frequency of the system, and the port speed, as expressed in thefollowing equation:N=PB_MAX_Latency_in_cc/((width_of_interface×clock_freq)/(port_speed))where:

-   -   PB_MAX_Latency_in_cc is the maximum latency interval of the        packet buffer in normal operation, measured in number of clock        cycles;    -   width_of_interface is the width of the interface in bytes;    -   clock_freq is the clock frequency of the system, measured in        MHz; and    -   port_speed is the speed of the port to which the data is        transferred by the transmit buffer, measured in GHz.        But to maintain throughput at the desired rate, the transmit        buffer needs to be able to store not only the number of data        chunks or cells to be buffered before transmission begins, but        also that same number of data chunks or cells again,        representing the amount of data in transit from the transmit        buffer to the port. Therefore, the buffer size N′ of the        transmit buffer in such known implementations could be expressed        as:        N′=2×PB_MAX_Latency_in_cc/((width_of_interface×clock_freq)/(port_speed))

However, in accordance with implementations of the subject matter of thepresent disclosure, it is not necessary to accumulate a specificquantity of data before beginning to transmit, beyond the amount of dataneeded to account for data in transit, as long as the maximum latencyinterval has passed from the time a request was issued for the firstdata chunk or cell to be transmitted. Because if the packet buffer isoperating properly, it will send the first data chunk or cell responsiveto the request within the maximum latency interval following therequest, and will send each subsequent chunk or cell within each maximumlatency interval following subsequent requests. Therefore, inimplementations of the subject matter of the present disclosure,irrespective of an actual fill level of the transmit buffer, which maybe affected for instance by a transmit rate of packets that werepreviously stored in the buffer, it is sufficient to wait for themaximum latency interval to elapse following a request to transmit aninitial or first chunk or cell of a network packet from the transmitbuffer to the port, and to then wait for a predetermined transmissioninterval, based on the data rate of the port, to elapse followingtransmission of each data chunk or cell, before transmitting the nextdata chunk or cell.

As noted, the packet buffer, if operating properly, guarantees that anydata chunk or cell that is requested will arrive from the packet buffer(which may be referred to as a first buffer) to the transmit buffer(which may be referred to as a second buffer), within the maximumlatency interval following a request for that data chunk or cell. Tomaintain the data rate of the port, data chunks or cells must betransmitted from the transmit buffer to the port at some predeterminedtransmission interval, based on that data rate, which may be differentfrom the rate at which data chunks or cells are supplied from the packetbuffer. Because each data chunk or cell, when requested from the packetbuffer, may not arrive until the full maximum latency interval haselapsed, in implementations of the subject matter of the presentdisclosure, data chunks or cells are requested from the packetbuffer—e.g., by a packet processor within the transmit direct memoryaccess (TXDMA) circuitry of the network switching device—no less oftenthan once every predetermined transmission interval (which is based onthe data rate as noted above).

At one extreme, if every respective data chunk or cell were to arriveexactly at the maximum latency interval following the respective requestfor that respective data chunk or cell, and the requests were spacedapart by the predetermined transmission interval, then no data would bestored in the transmit buffer. Rather, each data chunk or cell wouldarrive just as it was needed, and would immediately be transmitted outof the transmit buffer.

At another extreme, each data chunk or cell could arrive nearly as soonas it was requested, meaning that a relatively large number (determinedby the maximum latency interval and the predetermined transmissioninterval) of data chunks or cells would have to be stored. For example,if the maximum latency interval is 100 clock cycles, and thepredetermined transmission interval is 5 clock cycles, and if requestsfor data chunks or cells are issued every 5 clock cycles, then duringthe maximum latency interval following the request for the first datachunk or cell, before any data chunks or cells have been transmitted outby the transmit buffer, 20 data chunks or cells could arrive at thetransmit buffer and require storage, if each data chunk or cell isreturned, on average, no later than 5 clock cycles after beingrequested.

And if requests for data chunks or cells are issued morefrequently—i.e., are spaced apart by less than the predeterminedtransmission interval—then even more data could accumulate in thetransmit buffer.

However, the amount of data to be stored still is less than the amountstored by the previously known implementation that would not transmitany data until it had accumulated the amount of data that would betransmitted, at the predetermined data rate, during a complete maximumlatency interval. The amount of data stored in implementations accordingto the present disclosure is reduced by starting transmission based noton how much data has been accumulated in the transmit buffer, but ratheron how much time has elapsed since the request for the first data chunkor cell of a network packet.

Therefore, implementations of a transmit buffer in a memory moduleaccording to the subject matter of the present disclosure include atimer or timing mechanism to determine whether the maximum latencyinterval of the packet buffer has passed. In implementations where themaximum latency interval is measured as, or can be converted to, anumber of clock cycles, the timer may be a simple delay line having anumber of samples equal to that number of clock cycles. If a signal isinjected into the delay line when the request for the first data chunkor cell of a packet (i.e., the “start of packet” or “SOP” data chunk orcell) is issued, the signal will be clocked through the delay line, onesample per clock cycle, and will emerge at the output of the delay lineat the end of the maximum latency interval. The signal could be therequest itself, or an initial portion of the request, or a separatesignal generated in response to the request.

When the signal emerges from the output of the delay line, transmissionlogic in the memory module begins to transmit data from the transmitbuffer to the output port. The transmission logic may determine that thesignal has been output by the delay line, signaling the passage of themaximum latency interval, by examining a flag that may be set by thesignal once it has been output by the delay line. For example, in animplementation of the subject matter of the present disclosure, theoutput of the signal from the delay line increments a counter, which canbe examined by the transmission logic; if the counter contains anon-zero value, the flag is “set” and transmission of chunks or cells ofthe current network packet may begin. Upon beginning transmission, thetransmission logic may decrement the counter, resetting the flag for thestart of the next packet.

Monitoring of the maximum latency interval occurs only for the first(i.e., “start of packet” or “SOP”) chunk of a packet. Therefore, thereis no reason to expect that the counter would ever contain a value otherthan ‘0’ or ‘1’. Accordingly, it is not necessary to use a counter asthe flag. Any other type of device that can be set as desired to ‘0’ or‘1’ can be used as the flag. In such a case, the references above to“incrementing” and “decrementing” a counter may be considered moregenerally as “setting” and “resetting” (or “clearing”) a flag.

In such implementations, at no time is the amount of data currentlystored in the transmit buffer relevant to how long the transmissionlogic will wait to begin transmitting data chunks or cells out of thenetwork device. Data is transmitted from the transmit buffer based onthe maximum latency interval having elapsed, without regard to the filllevel of the transmit buffer.

As noted above, in implementations of the subject matter of the presentdisclosure the packet buffer is “probabilistic,” sending differentrequested data chunks or cells after different delays, as long as eachdelay is no longer than the maximum latency interval. Therefore, it ispossible that data chunks or cells will arrive at the transmit bufferout of order. In the example above, where the maximum latency intervalis 100 clock cycles and the predetermined transmission interval is 5clock cycles, with each request to the packet buffer for a data chunk orcell issued every 5 clock cycles, the third data chunk or cell,requested 10 clock cycles after the first data chunk or cell wasrequested, may arrive with a latency of 45 clock cycles—i.e., 55 clockcycles after the first data chunk was requested, while the seventh datachunk or cell, requested 30 clock cycles after the first data chunk orcell was requested, may arrive with a latency of 12 clock cycles—i.e.,42 clock cycles after the first data chunk or cell was requested, whichis 13 clock cycles before the third data chunk or cell arrives. This isonly an example; other combinations of latencies can affect other datachunks or cells to cause those other data chunks or cells to be out oforder.

Accordingly, a reordering mechanism may be provided to ensure thatchunks or cells of data are transmitted from the packet buffer accordingto their predetermined order in a network packet. In someimplementations, the data chunks or cells are supplied by the packetbuffer to the transmit buffer with tags specifying their ordinallocations, and the transmit buffer includes ordered storage locationswith addresses corresponding to the tags. As each data chunk or cellarrives at the transmit buffer from the packet buffer, it is stored intothe appropriate storage location based on its tag, and the data chunksor cells are then read out of the transmit buffer in order at the timeof transmission.

In some implementations of the subject matter of the present disclosure,the memory module processes a plurality of packet flows in parallel.That is, at any one time, the packet buffer could be receiving requestsfor data chunks or cells of different network packets, and the transmitbuffer would then be accumulating and transmitting different flows ofdata chunks or cells representing different network packets. Therefore,the transmit buffer may have different sets of the aforementionedordered storage locations, so that it can accumulate and reorder datachunks or cells for different packets.

In addition, the respective requests for the first chunks or cells ofthe different network packets normally would not be expected to arriveat the same times. Moreover, the maximum latency interval of the packetbuffer may differ for different types of data (e.g., the maximum latencyinterval for multi-case packets may differ from the maximum latencyinterval for unicast packets), or for packets of different sizes. Chunksor cells of the different types of packets with the differing maximumlatency intervals may be accumulated in different queues in the sametransmit buffer, or in separate transmit buffers. Either way, a memorymodule of a network device according to implementations of the presentdisclosure may need to accommodate different maximum latency intervalsfor different packets that are being accumulated in the transmit buffer.

This requirement may be accommodated by providing a plurality of timers(e.g., a plurality of delay lines), equal in number to the maximumnumber of channels (i.e., the maximum number of different networkpackets that can be accumulated at one time in the transmit buffer).Alternatively, this requirement may be accommodated by a single delayline, where the signal propagated through the delay line identifies thechannel to which it applies. As the signal is output from the delayline, its channel identification is examined and it is routed to thecounter or flag for the channel to which it applies to increment or setthe counter or flag. Different maximum latency intervals for differentchannels can be accommodated by tapping the delay line at differentpoints. The shorter maximum latency intervals will be tapped offearlier. Although the signals for all of the maximum latency intervalswill be output at all of the taps, the channel identification in eachsignal will cause any signal intended for one tap to be ignored at eachother tap.

FIG. 1 shows the Transmit, or Egress, portion of a network switchingdevice 100 incorporating of the subject matter of this disclosure.Network switching device 100 includes at least one packet buffer 101which receives, from elsewhere (not shown) in network switching device100, packets to be transmitted out of network switching device 100. Inimplementations of the subject matter of the present disclosure, packetbuffer 101 stores packets that are received from a computer networkwhile the packets (or data units representing the packets) are processedby a packet processor (not shown). Packet buffer 101 may be a singlestorage device capable of operating with different maximum latencyintervals for different types of packets, or may be a plurality ofstorage devices 111, each of which operates at separate maximum latencyinterval. In response to requests received at 102, packet buffer 101returns chunks or cells of network packets to transmit buffer 103, fortransmission at 104 out of network switching device 100.

At least one delay line 105 is provided as a timer, as described above.Delay line 105 includes a number of sample registers 115 equal to thenumber of clock cycles of delay in the maximum latency interval(expressed in clock cycles) to be monitored. When the request at 102 isfor an SOP (“start of packet”) data chunk or cell of any network packet,then when the request is sent to packet buffer 101, a pulse 106 is sentdown delay line 105 from the source of the request. Pulse 106 willadvance down delay line 105, advancing from one sample register 115 tothe next on each clock cycle. After a number of clock cycles equal tothe maximum latency interval (expressed in clock cycles) to bemonitored, pulse 106 will have advanced to the end of delay line 105,where it can be detected by counter 107 or other flag device (notshown). Because the maximum latency interval is to be measured from thetime a request reaches packet buffer 101, the circuit path from thesource of the request to the first sample register 115 should be atleast as long as the circuit path from the source of the request topacket buffer 101, to prevent pulse 106 from reaching the end of delayline 105 sooner than the end of the maximum latency interval.

When transmission logic 108 is otherwise ready to initiate transmissionof a data chunk or cell of a network patent out of transmit buffer 103,transmission logic 108 makes an inquiry 118 of counter 107, receivingback the value in counter 107. If the value received from counter 107 isnon-zero, transmission logic 108 instructs transmit buffer 103 at signal128 to transmit the chunks or cells of the appropriate network packet.Transmission logic 108 then issues a decrement command 138 to causecounter 107 to be reset.

In some implementations, there may be situations in which multiplepackets are processed concurrently. If the chunks or cells of all of thepackets have the same maximum latency interval, then the same delay line(or other timer) 105 can be used for all chunks or cells. A packetidentifier would be attached to or included in each pulse 106. Whenpulse 106 emerges from delay line 105 at final tap 125, transmissionlogic 108 reads the packet identifier from pulse 106 and initiatestransmission by transmit buffer 103 of a chunk or cell of the packetidentified by that packet identifier.

Even if the chunks or cells of different packets have different maximumlatency intervals, it is still possible to use the same delay line 105.Delay line 105 would have a number of sample registers 115 at leastequal to the longest maximum latency interval to be monitored. Pulses106 having packet identifiers identifying data chunks or cellsassociated with packets having that longest maximum latency intervalwould be detected at tap 125. Other taps 135 (two are shown, but therecan be any number up to the number of sample registers 115) would beused for shorter maximum delay intervals. Although each pulse 106 wouldtravel all the way through delay line 105, and be detected at all taps125, 135, the packet identifier of each pulse would ensure that eachpulse triggers transmission of a chunk or cell of only the correctpacket.

Alternatively, a plurality of delay lines 105, 145 of different lengthscan be provided to accommodate different maximum latency intervals, witheach delay line 105, 145 being monitored only at its respective finaltap 125.

In some implementations, delay lines 105, 145 are implemented usingstandard shift registers.

As noted above, in some implementations, because of the probabilisticnature of the operation of packet buffer 101, data chunks or cells ofany particular packet arrive at transmit buffer 103 out of order. Insome implementations, in order for the data chunks or cells of a networkpacket to be transmitted out of transmit buffer 103 in the correct orderto reconstruct the corresponding network packet, each chunk or cellarrives from packet buffer 103 with an associated tag number identifyingthe ordinal position of that data chunk or cell in its correspondingnetwork packet. In such implementations, transmit buffer 103 includesmemory locations allocated for each tag number. The data chunks or cellsare transmitted from transmit buffer 103 in tag number order toreconstruct the tags.

FIG. 2 shows an implementation 200 of transmit buffer 103 including aplurality of memory modules 201 each of which has a plurality of memoryslots 202 with addresses arranged in order. Alternatively, although eachdata chunk or cell is stored in transmit buffer 103 at an addressallocated according to its tag number, the memory slots allocated tothose tag numbers need not be physically in order. Transmission logic108 nevertheless accesses the data chunks for transmission in tag numberorder to ensure transmission of the data chunks in the correct order.

As noted above, once the first data chunk of a particular packet istransmitted, each subsequent chunk must be transmitted withinpredetermined transmission interval to prevent underrun. Therefore, inan implementation, transmission logic 108 has a plurality oftransmission interval timers 148 for timing the transmission intervalsbetween chunks of the respective packets. In some implementations of thesubject matter of the present disclosure, the number of transmissioninterval timers 148 determines the number of packets that can beprocessed at any one time.

An implementation of a method 300 of operating a network device asdescribed above is diagrammed in FIG. 3. At 301, a request for a firstdata chunk or cell of a network packet is received and then sent to apacket buffer. At 302, the amount of time that has elapsed since therequest was sent to the packet buffer is monitored to see if it hasreached the maximum latency interval for the packet. At 303, when theamount of time that has elapsed since the request was sent to the packetbuffer has reached the maximum latency interval for the packet, thefirst data chunk or cell of the network packet is transmitted out of thenetwork device, and a transmission interval timer is started. At 304,subsequent data chunks or cells are transmitted in order, one each uponpassage of each multiple of a predetermined transmission intervalfollowing transmission of the first data chunk or cell of the networkpacket, and method 300 ends.

Thus it is seen that a network switching device that reduces latency bydetermining when to begin a transmission based on the amount of timethat has elapsed time following the request that leads to thetransmission, rather than on the amount of data accumulated followingthe request that leads to the transmission, has been provided.

As used herein and in the claims which follow, the construction “one ofA and B” shall mean “A or B.”

It is noted that the foregoing is only illustrative of the principles ofthe invention, and that the invention can be practiced by other than thedescribed implementations, which are presented for purposes ofillustration and not of limitation, and the present invention is limitedonly by the claims which follow.

What is claimed is:
 1. A network device for connection to acommunications network, the network device comprising: a transmit bufferfrom which data is transmitted from the network device to thecommunications network; a packet buffer from which chunks of data aretransmitted to the transmit buffer in response to read requests, thepacket buffer having a first maximum read latency from receipt of arespective read request to transmission of a respective data chunkresponsive to the respective read request, and the packet bufferreceiving a first stream of read requests including a first read requestfor a first data chunk of a first network packet and a plurality ofadditional read requests for additional data chunks of the first networkpacket; a latency timer that monitors an amount of time that has elapsedfrom receipt of the first read request for the first data chunk of thefirst network packet, and outputs a latency signal when the amount oftime that has elapsed reaches the first maximum read latency; andtransmission logic configured to: wait until the amount of time that haselapsed from receipt of the first read request for the first data chunkof the first network packet equals the first maximum read latency; andwhen the amount of time that has elapsed from receipt of the first readrequest for the first data chunk of the first network packet, transmitthe first data chunk of the first network packet from the transmitbuffer, without regard to satisfaction of a fill level threshold by anumber of one or more data chunks that are present in the transmitbuffer.
 2. The network device of claim 1 further comprising a latencycounter that is incremented by the latency signal output by the latencytimer; wherein: the transmission logic is configured to check thelatency counter following the first request for the first data chunk ofthe first network packet, until a non-zero value is detected, signifyingthat the amount of time that has elapsed from receipt of the first readrequest for the first data chunk of the first network packet at leastequals the first maximum read latency.
 3. The network device of claim 1wherein the first stream of read requests is received in a read order,the network device further comprising a transmission timer configured tomeasure a period of time that has elapsed from the transmitting of thefirst data chunk of the first network packet from the transmit buffer;wherein: the transmission logic is configured to, when the period oftime that has elapsed from the transmitting of the first data chunk ofthe first network packet from the transmit buffer reaches any integermultiple of a predetermined interval that defines a desired data rate,transmit a next data chunk of the first network packet, according to theread order, without regard to the satisfaction of the fill levelthreshold by the number of one or more data chunks that are present inthe transmit buffer.
 4. The network device of claim 3 wherein: the datachunks of the first network packet arrive at the transmit buffer out ofthe read order, the data chunks of the first network packet being taggedwith indications of ordinal position in the first network packet; andthe transmit buffer comprises a set of ordered locations for storing thedata chunks of the first network packet according to the indications ofordinal position, prior to transmission from the transmit buffer.
 5. Thenetwork device of claim 1 wherein: the first maximum read latency isdefined by a number of clock cycles between receipt of a respective readrequest to transmission of a respective data chunk responsive to therespective read request; and the latency timer comprises a delay linehaving a number of sampling elements equal to the number of clock cyclesdefining the first maximum read latency.
 6. The network device of claim5, wherein the delay line comprises a shift register.
 7. The networkdevice of claim 5, further comprising a latency counter coupled to afirst output tap of the delay line; wherein: the transmission logic isconfigured to check the latency counter for a non-zero value todetermine when the amount of time that has elapsed from receipt of thefirst read request for a first data chunk of the first network packetreaches the first maximum read latency.
 8. The network device of claim 1wherein: the packet buffer receives at least one additional stream ofread requests including a first read request for a first data chunk ofan additional network packet and a plurality of additional read requestsfor additional data chunks of the additional network packet; the packetbuffer has a respective additional maximum read latency for eachrespective additional stream of read requests; the latency timer furthermeasures a respective additional amount of time that has elapsed timefrom each first read request for each respective first data chunk ofeach respective additional network packet; and the transmission logic isfurther configured to: wait until the respective additional amount oftime that has elapsed from the first read request for the respectivefirst data chunk of each respective additional network packet equals therespective additional maximum read latency, and when the respectiveadditional amount of time that has elapsed from the first read requestfor the respective first data chunk of each respective additionalnetwork packet equals the respective additional maximum read latency,transmit the first data chunk of the respective additional networkpacket from the transmit buffer, without regard to the satisfaction ofthe fill level threshold by the number of one or more data chunks thatare present in the transmit buffer.
 9. The network device of claim 8wherein: each of the first maximum read latency and each respectiveadditional maximum read latency is measured as a respective number ofclock cycles; and the latency timer comprises a delay line having anumber of samples equal to a number of clock cycles in a longest one ofthe first maximum read latency and each respective additional maximumread latency, each respective one of the first maximum read latency andeach respective additional maximum read latency corresponding to arespective tap of the delay line.
 10. The network device of claim 9further comprising a respective latency counter coupled to eachrespective output tap of the delay line; wherein: the transmission logicis configured to check each respective latency counter for a non-zerovalue to determine that the respective additional amount of time thathas elapsed from the first read request for a first data chunk of arespective network packet equals the respective maximum read latency.11. A method of operating a network device coupled to a communicationsnetwork, the method comprising: receiving at a packet buffer of thenetwork device a stream of read requests to read data of network packetsfrom the packet buffer of the network device, the read requestsincluding a first read request to read a first data chunk of a firstnetwork packet and a plurality of subsequent read requests to readsubsequent data chunks of the first network packet, each of the firstrequest and the plurality of subsequent read requests causing arespective data chunk to be communicated from the packet buffer to atransmit buffer, the packet buffer having a maximum read latencyindicative of an amount of time required, following one of the firstread request or any one of the subsequent read requests, to return adata chunk from the packet buffer; monitoring an amount of time that haselapsed from receipt of the first read request for the first data chunkof the first network packet; and when the amount of time that haselapsed from receipt of the first read request for the first data chunkof the first network packet equals the maximum read latency,transmitting the first data chunk of the first network packet from thetransmit buffer, without regard to satisfaction of a fill levelthreshold by a number of one or more data chunks that are present in thetransmit buffer.
 12. The method of claim 11, wherein the measuring theamount of time that has elapsed, from receipt of the first read requestfor the first data chunk of the first network packet comprises:providing a delay line having a delay equal to the maximum read latency;injecting a signal into the delay line upon the receipt of the firstread request for the first data chunk of the first network packet;monitoring an output of the delay line for the signal; incrementing acounter from ‘0’ to a non-zero value upon detection of the signal at theoutput of the delay line; and checking whether the counter contains anonzero value.
 13. The method of claim 11 wherein the stream of readrequests is received in a read order, the method further comprising:monitoring a period of time that has elapsed from commencement oftransmission of the first data chunk of the first network packet fromthe transmit buffer; and when the period of time that has elapsed fromcommencement of transmission of the first data chunk of the firstnetwork packet from the transmit buffer reaches any integer multiple ofa predetermined time interval, defining a desired data rate, followingthe commencement of transmission of the first data chunk of the firstnetwork packet from the transmit buffer, transmitting one of thesubsequent data chunks of the first network packet according to the readorder, without regard to the satisfaction of the fill level threshold bythe number of one or more data chunks that are present in the transmitbuffer.
 14. The method of claim 13 further comprising, for data chunksthat arrive at the transmit buffer out of the read order: reordering thedata chunks prior to transmission from the transmit buffer; andtransmitting the reordered data chunks from the transmit buffer in theread order.
 15. The method of claim 14 wherein: the data chunks aretagged with indications of ordinal position within the network packet;and the reordering comprises storing the tagged data chunks, accordingto the indications of ordinal position within the network packet, inordered locations in the transmit buffer.
 16. The method of claim 11wherein: there are a plurality of respective additional streams ofrespective additional read requests corresponding to a plurality ofrespective network packets, each respective additional stream of readrequests comprising a respective additional first request for arespective additional first data chunk of each respective additionalnetwork packet and respective additional subsequent requests forrespective additional subsequent data chunks of each respectiveadditional network packet from the packet buffer, each respectiveadditional stream of respective additional read requests being receivedin a respective read order for its respective additional network packet,the packet buffer having a respective maximum read latency for eachrespective additional stream of respective additional read requests; themethod further comprising: monitoring a respective additional amount oftime that has elapsed from receipt of each respective additional readrequest, in a respective additional stream of respective additional readrequests, for each respective additional first data chunk of eachrespective additional network packet other than the first network; andwhen the respective additional amount of time that has elapsed fromreceipt of the respective additional first read request for therespective additional first data chunk of each respective additionalnetwork packet other than the first network packet equals the respectiveadditional maximum read latency for the respective additional stream ofrespective additional read requests, transmitting the respectiveadditional first data chunk of the respective additional network packetfrom the transmit buffer.
 17. The method of claim 16 wherein monitoringthe amount of time that has elapsed from receipt of the first readrequest for the first data chunk of the first network packet, and themonitoring the respective additional amount of time that has elapsedfrom receipt of each respective additional read request, in one of therespective additional streams of respective additional read requests,for a respective additional first data chunk of each respectiveadditional network packet other than the first network packet, comprise:providing a delay line having respective delays equal to each respectivemaximum read latency; injecting a respective signal into the delay lineupon the receipt of a respective first read request for a respectivefirst data chunk of a respective first network packet; monitoring arespective output of the delay line for the respective signal;incrementing a respective counter from ‘0’ to a non-zero value upondetection of the respective signal at the respective output of the delayline; and checking whether a respective counter contains a non-zerovalue.
 18. The method of claim 16 further comprising: monitoring arespective period of time that has elapsed from respective commencementof transmission of the first data chunk of each respective networkpacket from the transmit buffer; and upon elapsing of each integermultiple of a respective predetermined time interval, defining a desireddata rate, following the respective commencement of the transmission ofthe first data chunk of each respective network packet from the transmitbuffer, transmitting a respective subsequent data chunk of therespective network packet, without regard to the satisfaction of thefill level threshold by the number of one or more data chunks that arepresent in the transmit buffer.
 19. The method of claim 18 furthercomprising, for data chunks of a respective network packet having a readorder, that arrive at the transmit buffer out of the read order:reordering the data chunks of the respective network packet prior totransmission from the transmit buffer; and transmitting the reordereddata chunks of the respective network packet from the transmit buffer inthe read order.
 20. The method of claim 19 wherein: the data chunks ofthe respective network packet are tagged with respective indications ofordinal position within the respective network packet; and thereordering comprises storing the tagged data chunks of the respectivenetwork packet, according to the respective indications of ordinalposition within the respective network packet, in a respective set ofordered locations in the transmit buffer.
 21. A method of operating anetwork device coupled to a communications network, the methodcomprising: receiving at a packet buffer of the network device a streamof read requests to read data of a network packet from the packet bufferof the network device, the read requests including a first read requestto read a first data chunk of the network packet and a plurality ofsubsequent read requests to read additional data chunks of the networkpacket, each of the first request and the plurality of subsequent readrequests causing a respective data chunk to be communicated from thepacket buffer to a transmit buffer; after elapsing of an amount of time,from receipt of the first read request for the first data chunk of thenetwork packet, equal to a maximum read latency indicative of an amountof time required, following one of the first read request or any one ofthe subsequent read requests, to return a data chunk from the packetbuffer, transmitting the first data chunk of the network packet from thetransmit buffer without regard to satisfaction of a fill level thresholdby a number of one or more data chunks that are present in the transmitbuffer; and transmitting subsequent data chunks of the network packet atmultiples of a predetermined time interval, defining a desired datarate, following commencement of the transmitting of the first data chunkof the network packet.
 22. The method of claim 21 wherein: thetransmitting the first data chunk of the network packet from thetransmit buffer without regard to the satisfaction of the fill levelthreshold by the number of one or more data chunks that are present inthe transmit buffer comprises: monitoring an amount of time that haselapsed from receipt of the first read request for the first data chunkof the network packet, and when the amount of time that has elapsed fromreceipt of the first read request for the first data chunk of thenetwork packet equals the maximum read latency, transmitting the firstdata chunk of the network packet from the transmit buffer.
 23. Themethod of claim 22 wherein the monitoring the amount of time that haselapsed from receipt of the first read request for a first data chunk ofthe network packet comprises: providing a delay line having a delayequal to the maximum read latency; injecting a signal into the delayline upon the receipt of the first read request for a first data chunkof the network packet; monitoring an output of the delay line for thesignal; incrementing a counter from ‘0’ to a non-zero value upondetection of the signal at the output of the delay line; and checkingwhether the counter contains a non-zero value.
 24. The method of claim21 further comprising, for data chunks of the network packet having aread order, that arrive at the transmit buffer out of the read order:reordering the data chunks of the network packet prior to transmissionfrom the transmit buffer; and transmitting the reordered data chunks ofthe network packet from the transmit buffer in the read order.